<%@page import="memberBean.MemberVo"%>
<%@page import="java.util.ArrayList"%>
<%@page import="bean.MemberDTO"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script src="./js/member.js"></script>
<link rel="stylesheet" href="./css/member.css" />
</head>
<body>

<jsp:useBean id="vo" class='memberBean.MemberVo' scope="page"/>
<jsp:setProperty property="*" name="vo"/>
<%
MemberDTO dto = new MemberDTO();
dto.setVo(vo);
ArrayList<MemberVo> al = dto.select();
%>
<form name='hiddenFrm' method="post" value='<%=vo.getNowPage()%>'>
	<input type="hidden" name='nowPage' value='<%=vo.getFind()%>'>
	<input type="hidden" name='find' value='<%=vo.getRno()%>'>
	<input type="hidden" name='rno'>
</form>
<h1>회원 LIST</h1>
	<div name='member_list_find'>
	<form name='member_list_frm' method='post'>
			<input type='text' name='find' value='<%=vo.getFind() %>'>
			<input type="submit" value="검색">
			<input type="button" id="btnInput" name='sung' value="회원등록 ">
	</form>
	</div>
	<br/>
<div id='member_List_title'>
	<div class='member_list_rno'>순번</div>
	<div class='member_list_mid'>아이디</div>
	<div class='member_list_pwd'>암호</div>
	<div class='member_list_nicname'>닉넴</div>
	<div class='member_list_irum'>이름</div>
	<div class='member_list_photo'>사진</div>
	
</div>
<%for(int a=0;a<al.size();a++){
	MemberVo v = al.get(a);
	 %>
<div class='member_list_items'>
	<div class='member_list_rno'><%=v.getRno() %></div>
	<div class='member_list_mid'>
	<a href='#' onclick='goView(<%=dto.getNowPage()%>,<%=v.getRno() %>)'>
	<%=v.getMid() %></div>
	</a>
	<div class='member_list_pwd'><%=v.getPwd() %></div>
	<div class='member_list_nicname'><%=v.getNicname()%></div>
	<div class='member_list_irum'><%=v.getIrum() %></div>
	<div class='member_list_photo'><%=v.getPhoto() %></div>	
</div>
<%} %>	
<%if(dto.getNowBlock()!= 1){%>
<a href='#' onclick='goPage(1)'>맨첨</a>
<a href='#' onclick='goPage(<%=dto.getStartPage()-1 %>)'>이전</a>
<%
}%>
<%int i =0;
for(i=dto.getStartPage(); i<=dto.getEndPage(); i++){%>
	<a href='#' onclick='goPage(<%=i%>)'><%=i %></a>
<%}%>
<%if(i<=dto.getTotPage()){%>
<a href='#' onclick='goPage(<%=i%>)'>다음</a>	
<a href='#' onclick='goPage(<%=dto.getTotPage()%>)'>맨끝</a>	
<%} %>
</div>
<input type="button" value="회원 등록" id="btnInput" />
<input type="button" value="보기" id="btnView" />
</body>
<script type="text/javascript">listInit();</script>
</html>